package com.lagou.service.impl;

import com.lagou.dao.UserDao;
import com.lagou.po.UserPO;
import com.lagou.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @AUTHOR: yb.feng
 * @DATE: 2020/7/1 21:01
 * @DESC:
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public UserPO findByUserName(String userName) {
        return userDao.findByUserName(userName);
    }

    @Override
    public void saveToken(String email, String token) {
        userDao.saveToken(email, token);
    }

    @Override
    public String findEmailByToken(String token) {
        return userDao.findEmailByToken(token);
    }

    @Override
    public void saveUser(UserPO userPO) {
        userDao.saveUser(userPO);
    }

}
